package genericdemo;
class MyArray<T>{
    public Object[] obj = new Object[3];

    public Object getPos(int pos){
        return obj[pos];
    }

    public void setPos(int pos, Object val){
        obj[pos] = val;
    }
}
public class Test {
    public static void main1(String[] args) {

        MyArray<Integer> myArray = new MyArray<Integer>();

        myArray.setPos(0,10);
        myArray.setPos(1,"hello");
        myArray.setPos(2,10.0);
    }
}
